home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat5 / fcntl.z / fcntl
Encoding:
Text File  |  2001-04-17  |  12.8 KB  |  199 lines

  1.  
  2.  
  3.  
  4. ffffccccnnnnttttllll((((5555))))                                                              ffffccccnnnnttttllll((((5555))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      fcntl - file control options
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<ffffccccnnnnttttllll....hhhh>>>>
  13.  
  14. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  15.      The _f_c_n_t_l._h header defines the following requests and arguments for use
  16.      by the functions _f_c_n_t_l (see _f_c_n_t_l(2)) and _o_p_e_n (see _o_p_e_n(2)).
  17.  
  18.      Values for _c_m_d used by _f_c_n_t_l (the following values are unique):
  19.          FFFF____DDDDUUUUPPPPFFFFDDDD             Duplicate file descriptor
  20.          FFFF____GGGGEEEETTTTFFFFDDDD             Get file descriptor flags
  21.          FFFF____SSSSEEEETTTTFFFFDDDD             Set file descriptor flags
  22.          FFFF____GGGGEEEETTTTFFFFLLLL             Get file status flags
  23.          FFFF____SSSSEEEETTTTFFFFLLLL             Set file status flags
  24.          FFFF____GGGGEEEETTTTLLLLKKKK             Get record locking information
  25.          FFFF____SSSSEEEETTTTLLLLKKKK             Set record locking information
  26.          FFFF____SSSSEEEETTTTLLLLKKKKWWWW            Set record locking information;
  27.                              wait if blocked
  28.          FFFF____AAAALLLLLLLLOOOOCCCCSSSSPPPP           Allocate file space
  29.          FFFF____AAAALLLLLLLLOOOOCCCCSSSSPPPP           Allocate 64-bit file space
  30.          FFFF____FFFFRRRREEEEEEEESSSSPPPP            Free file space
  31.          FFFF____FFFFRRRREEEEEEEESSSSPPPP            Free 64-bit file space
  32.          FFFF____SSSSEEEETTTTBBBBSSSSDDDDLLLLKKKK          Set BSD record locking information
  33.          FFFF____SSSSEEEETTTTBBBBSSSSDDDDLLLLKKKKWWWW         Set BSD record locking information;
  34.                              wait if blocked
  35.          FFFF____DDDDIIIIOOOOIIIINNNNFFFFOOOO           Get direct I/O parameters
  36.          FFFF____RRRRSSSSEEEETTTTLLLLKKKK            Remote SETLK for NFS
  37.          FFFF____RRRRGGGGEEEETTTTLLLLKKKK            Remote GETLK for NFS
  38.          FFFF____RRRRSSSSEEEETTTTLLLLKKKKWWWW           Remote SETLKW for NFS
  39.          FFFF____GGGGEEEETTTTOOOOWWWWNNNN            Get owner (socket emulation)
  40.          FFFF____SSSSEEEETTTTOOOOWWWWNNNN            Set owner (socket emulation)
  41.          FFFF____SSSSEEEETTTTTTTTRRRRAAAANNNNSSSSFFFFEEEERRRR       Set transfer context for data pipe
  42.          FFFF____DDDDEEEESSSSTTTTRRRROOOOYYYYTTTTRRRRAAAANNNNSSSSFFFFEEEERRRR   Destroy transfer context for data pipe
  43.          FFFF____AAAALLLLLLLLOOOOCCCCSSSSPPPP66664444         Allocate file space
  44.          FFFF____FFFFRRRREEEEEEEESSSSPPPP66664444          Free file space
  45.          FFFF____GGGGEEEETTTTLLLLKKKK66664444           Get record locking information
  46.          FFFF____SSSSEEEETTTTLLLLKKKK66664444           Set record locking information
  47.          FFFF____SSSSEEEETTTTLLLLKKKKWWWW66664444          Set record locking information;
  48.                              wait if blocked
  49.          FFFF____RRRREEEESSSSVVVVSSSSPPPP            Reserve file space
  50.          FFFF____UUUUNNNNRRRREEEESSSSVVVVSSSSPPPP          Unreserve file space
  51.          FFFF____RRRREEEESSSSVVVVSSSSPPPP66664444          Reserve file space
  52.          FFFF____UUUUNNNNRRRREEEESSSSVVVVSSSSPPPP66664444        Unreserve file space
  53.          FFFF____FFFFSSSSGGGGEEEETTTTXXXXAAAATTTTTTTTRRRRAAAA       Get extended attributes
  54.          FFFF____FFFFSSSSYYYYNNNNCCCC             Flush a file range
  55.          FFFF____FFFFSSSSYYYYNNNNCCCC66664444           Flush a 64-bit file range
  56.          FFFF____GGGGEEEETTTTBBBBIIIIOOOOSSSSIIIIZZZZEEEE        Get the preferred buffer I/O sizes
  57.          FFFF____SSSSEEEETTTTBBBBIIIIOOOOSSSSIIIIZZZZEEEE        Set the preferred buffer I/O sizes
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ffffccccnnnnttttllll((((5555))))                                                              ffffccccnnnnttttllll((((5555))))
  71.  
  72.  
  73.  
  74.      File descriptor flags used for _f_c_n_t_l:
  75.          FFFFDDDD____CCCCLLLLOOOOEEEEXXXXEEEECCCC          Close the file descriptor upon
  76.                              execution of an exec function [see _e_x_e_c(2)]
  77.  
  78.      File status flags used for _o_p_e_n and _f_c_n_t_l:
  79.          OOOO____NNNNDDDDEEEELLLLAAAAYYYY            Non-blocking I/O
  80.          OOOO____AAAAPPPPPPPPEEEENNNNDDDD            Append
  81.          OOOO____SSSSYYYYNNNNCCCC              Synchronous write option
  82.          OOOO____DDDDSSSSYYYYNNNNCCCC             Synchronous write option for data
  83.          OOOO____RRRRSSSSYYYYNNNNCCCC             Synchronous data integrity read
  84.          FFFFAAAASSSSYYYYNNNNCCCC              Interrupt-driven I/O for sockets
  85.          OOOO____NNNNOOOONNNNBBBBLLLLOOOOCCCCKKKK          Non-blocking I/O
  86.          OOOO____LLLLCCCCFFFFLLLLUUUUSSSSHHHH           Flush cache on last close
  87.          OOOO____LLLLCCCCIIIINNNNVVVVAAAALLLL           Flush and invalidate cache on last close
  88.  
  89.      Values for _l__t_y_p_e used for record locking with _f_c_n_t_l
  90.      (the following values are unique):
  91.          FFFF____RRRRDDDDLLLLCCCCKKKK             Shared or read lock
  92.          FFFF____UUUUNNNNLLLLCCCCKKKK             Unlock
  93.          FFFF____WWWWRRRRLLLLCCCCKKKK             Exclusive or write lock
  94.  
  95.      Values for _o_f_l_a_g used by _o_p_e_n:
  96.          OOOO____CCCCRRRREEEEAAAATTTT             Create file if it does not exist
  97.          OOOO____EEEEXXXXCCCCLLLL              Exclusive use flag
  98.          OOOO____NNNNOOOOCCCCTTTTTTTTYYYY            Do not assign controlling tty
  99.          OOOO____TTTTRRRRUUUUNNNNCCCC             Truncate flag
  100.          OOOO____DDDDIIIIRRRREEEECCCCTTTT            Direct I/O
  101.          OOOO____LLLLAAAARRRRGGGGEEEEFFFFIIIILLLLEEEE         Allow large file opens
  102.  
  103.      Mask for use with file access modes:
  104.          OOOO____AAAACCCCCCCCMMMMOOOODDDDEEEE           Mask for file access modes
  105.  
  106.      File access modes used for _o_p_e_n and _f_c_n_t_l:
  107.          OOOO____RRRRDDDDOOOONNNNLLLLYYYY            Open for reading only
  108.          OOOO____RRRRDDDDWWWWRRRR              Open for reading and writing
  109.          OOOO____WWWWRRRROOOONNNNLLLLYYYY            Open for writing only
  110.  
  111.      The constants used for file modes are defined to have the same values as
  112.      in _ssss_yyyy_ssss_////_ssss_tttt_aaaa_tttt_...._hhhh.  These constants exist in _ffff_cccc_nnnn_tttt_llll_...._hhhh also in order to comply
  113.      with the XPG4 standards.
  114.  
  115.           ####ddddeeeeffffiiiinnnneeee SSSS____IIIISSSSUUUUIIIIDDDD     /* set user id on execution */
  116.           ####ddddeeeeffffiiiinnnneeee SSSS____IIIISSSSGGGGIIIIDDDD     /* set group id on execution */
  117.           ####ddddeeeeffffiiiinnnneeee SSSS____IIIIRRRRWWWWXXXXUUUU     /* read, write, execute: owner */
  118.           ####ddddeeeeffffiiiinnnneeee SSSS____IIIIRRRRUUUUSSSSRRRR     /* read permission: owner */
  119.           ####ddddeeeeffffiiiinnnneeee SSSS____IIIIWWWWUUUUSSSSRRRR     /* write permission: owner */
  120.           ####ddddeeeeffffiiiinnnneeee SSSS____IIIIXXXXUUUUSSSSRRRR     /* execute permission: owner */
  121.           ####ddddeeeeffffiiiinnnneeee SSSS____IIIIRRRRWWWWXXXXGGGG     /* read, write, execute: group */
  122.           ####ddddeeeeffffiiiinnnneeee SSSS____IIIIRRRRGGGGRRRRPPPP     /* read permission: group */
  123.           ####ddddeeeeffffiiiinnnneeee SSSS____IIIIWWWWGGGGRRRRPPPP     /* write permission: group */
  124.           ####ddddeeeeffffiiiinnnneeee SSSS____IIIIXXXXGGGGRRRRPPPP     /* execute permission: group */
  125.           ####ddddeeeeffffiiiinnnneeee SSSS____IIIIRRRRWWWWXXXXOOOO     /* read, write, execute: other */
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. ffffccccnnnnttttllll((((5555))))                                                              ffffccccnnnnttttllll((((5555))))
  137.  
  138.  
  139.  
  140.           ####ddddeeeeffffiiiinnnneeee SSSS____IIIIRRRROOOOTTTTHHHH     /* read permission: other */
  141.           ####ddddeeeeffffiiiinnnneeee SSSS____IIIIWWWWOOOOTTTTHHHH     /* write permission: other */
  142.           ####ddddeeeeffffiiiinnnneeee SSSS____IIIIXXXXOOOOTTTTHHHH     /* execute permission: other */
  143.  
  144.  
  145.      The constants used for the _llll_ssss_eeee_eeee_kkkk routine are defined to have the same
  146.      values as in _uuuu_nnnn_iiii_ssss_tttt_dddd_...._hhhh.  These constants exist in _ffff_cccc_nnnn_tttt_llll_...._hhhh also in order to
  147.      comply with the XPG4 standards.
  148.  
  149.           ####ddddeeeeffffiiiinnnneeee SSSSEEEEEEEEKKKK____SSSSEEEETTTT     /* Set file pointer to "offset" */
  150.           ####ddddeeeeffffiiiinnnneeee SSSSEEEEEEEEKKKK____CCCCUUUURRRR     /* Set file pointer to current plus"offset" */
  151.           ####ddddeeeeffffiiiinnnneeee SSSSEEEEEEEEKKKK____EEEENNNNDDDD     /* Set file pointer to EOF plus"offset" */
  152.  
  153.  
  154.      The structure _f_l_o_c_k describes a file lock.  It includes the following
  155.      members:
  156.  
  157.           short   l_type;     /* Type of lock */
  158.           short   l_whence;   /* Flag for starting offset */
  159.           off_t   l_start;    /* Relative offset in bytes */
  160.           off_t   l_len;      /* Size; if 0 then until EOF */
  161.           long    l_sysid;    /* Returned with F_GETLK */
  162.           pid_t   l_pid;      /* Returned with F_GETLK */
  163.  
  164.  
  165.      The structure _f_l_o_c_k_6_4 describes a file lock for use on large files.  It
  166.      includes the following members:
  167.  
  168.           short   l_type;     /* Type of lock */
  169.           short   l_whence;   /* Flag for starting offset */
  170.           off64_t l_start;    /* Relative offset in bytes */
  171.           off64_t l_len;      /* Size; if 0 then until EOF */
  172.           long    l_sysid;    /* Returned with F_GETLK */
  173.           pid_t   l_pid;      /* Returned with F_GETLK */
  174.  
  175.  
  176.      The structure _b_i_o_s_i_z_e is used to pass information about the preferred I/O
  177.      sizes used for a file.  It contains the following members:
  178.  
  179.           __uint32_t biosz_flags;     /* 1 if defaults are overridden */
  180.           __int32_t  biosz_read;      /* all values specified as log */
  181.           __int32_t  biosz_write;     /*     base2 of the true length */
  182.           __int32_t  dfl_biosz_read;  /* Returned with F_GETBIOSIZE */
  183.           __int32_t  dfl_biosz_write; /* Returned with F_GETBIOSIZE */
  184.  
  185.  
  186. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  187.      creat(2), exec(2), fcntl(2), open(2)
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.